package com.vn.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="Interest")
public class Interest {

	public Interest() {
	}

	public Interest(PaymentMode paymentMode, Date timeUpdate,
			double totalInterest) {
		super();
		this.paymentMode = paymentMode;
		this.timeUpdate = timeUpdate;
		this.totalInterest = totalInterest;
	}
	
	@Id
	@GeneratedValue
	@Column(name="IDInterest")
	private int id;
	
	@JoinColumn(name="PaymentModeID",referencedColumnName="IDPaymentMode")
	@ManyToOne
	private PaymentMode paymentMode;
	
	@Column(name="TimeUpdate")
	private Date timeUpdate=new Date();
	
	@Column(name="TotalInterest")
	private double totalInterest;

	public PaymentMode getPaymentMode() {
		return paymentMode;
	}

	public void setPaymentMode(PaymentMode paymentMode) {
		this.paymentMode = paymentMode;
	}

	public Date getTimeUpdate() {
		return timeUpdate;
	}

	public void setTimeUpdate(Date timeUpdate) {
		this.timeUpdate = timeUpdate;
	}

	public double getTotalInterest() {
		return totalInterest;
	}

	public void setTotalInterest(double totalInterest) {
		this.totalInterest = totalInterest;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	
}
